public class Gnss {
    public static void main(String[] args) {
        if(args.length != 3) {
            System.out.println("错误，需要三个参数");
            return;
        }

        try {
            double x = Double.parseDouble(args[0]);
            double y = Double.parseDouble(args[1]);
            double z = Double.parseDouble(args[2]);
            double result = GNSSArithmetic(x, y, z);
            System.out.println("result = " + result);
        } catch (NumberFormatException e) {
            System.out.println("错误：参数必须是有效数字");
        }
    }

    public static double GNSSArithmetic(double x, double y, double z) {
        return Math.sqrt(x * x + y * y + z * z);
    }
}
